$OpenBSD: patch-config_cf_Motif_rules,v 1.2 2012/10/28 11:05:45 sthen Exp $
--- config/cf/Motif.rules.orig	Mon Oct 22 15:50:39 2012
+++ config/cf/Motif.rules	Wed Oct 24 21:18:52 2012
@@ -38,10 +38,10 @@ XCOMM $TOG: Motif.rules /main/8 1999/03/22 15:12:48 mg
 # define MotifIsTopLevelProject	NO
 #endif
 
-/* Include the X11 project rules file. */
+#ifndef X11IsTopLevelProject
 #include <X11.rules>
+#endif
 
-
 /* Use the in-tree Motif by default. */
 #ifndef UseInstalledMotif
 # define UseInstalledMotif	NO
@@ -686,7 +686,7 @@ clean::									@@\
 #define Real_MessageCatalogRule(prefix)					@@\
 prefix.cat Concat(prefix,MsgCatI.h):					@@\
 	$(RM) Concat(prefix,MsgCatI.h) prefix.cat $(MLOCSRC)/C/msg/prefix.msg	@@\
-	$(MKCATTOOL) Concat(prefix,MsgCatI.h) prefix.msg > $(MLOCSRC)/C/msg/prefix.msg	@@\
+	$(MKCATTOOL) Concat(prefix,MsgCatI.h) prefix.msg | sed '/^[ 	]*$$/d' > $(MLOCSRC)/C/msg/prefix.msg	@@\
 	$(GENCAT) prefix.cat $(MLOCSRC)/C/msg/prefix.msg		@@\
 									@@\
 includes:: prefix.cat Concat(prefix,MsgCatI.h)				@@\
